package Feb_14.TestAccount;

public class Account {
    double balance = 0;
    public synchronized void addMoney(double amt) {
        balance+=amt;
        try {
            Thread.sleep(10);
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName()+":"+balance);
    }
}
